import TemplateModal from '@/components/TemplateModal';
import { Button, ConfigProvider } from 'antd';
import { useRef } from 'react';
const Index = () => {
  const modalRef = useRef();
  const onOk = () => {
    modalRef?.current?.hideModal();
  };
  const onCancel = () => {
    modalRef?.current?.hideModal();
  };

  return (
    <>
      <ConfigProvider
        theme={{
          components: {
            Button: {
              /* 这里是你的组件 token */
              contentBg: '#f5f5',
              footerBg: 'red',
            },
          },
        }}
      >
        <Button onClick={() => modalRef?.current?.showModal()}>
          点击打开弹框
        </Button>
      </ConfigProvider>
      <TemplateModal ref={modalRef} onOk={onOk} onCancel={onCancel}>
        
      </TemplateModal>
    </>
  );
};
export default Index;
